// 成功输出管理
package pkgerrors

import (
	"fmt"
	"strings"
)

type PkgSuccess struct {
	Status  OutputType
	Message string
}

func (s *PkgSuccess) Error() string {
	var builder strings.Builder
	builder.WriteString(fmt.Sprintf("[成功][%04d]%s ", s.Status, s.Message))
	return builder.String()
}

func (ps *PkgSuccess) NewSuccess(types OutputType, message string) *PkgSuccess {
	return &PkgSuccess{Status: types, Message: message}
}
func (ps *PkgSuccess) WrapSuccess(types OutputType, message string) *PkgSuccess {
	return &PkgSuccess{Status: types, Message: message}
}

type SuccessManage struct {
	colorEnabled bool
}

func NewSuccessManage() *SuccessManage {
	return &SuccessManage{}
}
